package com.scorpio.goods.vo;

import com.scorpio.basic.vo.OssDatumVo;
import com.scorpio.common.utils.verification.AddGroup;
import com.scorpio.common.utils.verification.DefaultGroup;
import com.scorpio.common.utils.verification.UpdateGroup;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

public class AddGoodsVo {


    //相关类目ID
    @NotNull(message = "无效类目", groups = {DefaultGroup.class})
    private Long categoryId;

    @NotNull(message = "无效修改数据", groups = {UpdateGroup.class})
    private Long id;

    //商品封面张图
    @NotBlank(message = "请上传商品封面张图", groups = {DefaultGroup.class})
    private String image;

    //商品名字
    @NotBlank(message = "商品名不能为空", groups = {DefaultGroup.class})
    @Size(min = 1, max = 50, message = "商品名限制为1-50个字符")
    private String goodsName;

    //状态;0=已上架,1=未上架
    @NotBlank(message = "状态不能为空", groups = {DefaultGroup.class})
    private String status;

    //优先级
    private Integer sort;

    //是否置顶
    private String isTop;

    //是否首页推荐
    private String isRecomm;

    //sku分组
    @Valid
    @NotNull(message = "异常提交数据", groups = {AddGroup.class})
    private List<AddGoodsSkuGroupVo> skuGroup;

    //商品图片
    @Valid
    @NotNull(message = "异常提交数据", groups = {DefaultGroup.class})
    private List<OssDatumVo> imageOss;

    //详情图片
    @Valid
    @NotNull(message = "异常提交数据", groups = {DefaultGroup.class})
    private List<OssDatumVo> detailsOss;

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public List<OssDatumVo> getImageOss() {
        return imageOss;
    }

    public void setImageOss(List<OssDatumVo> imageOss) {
        this.imageOss = imageOss;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getIsTop() {
        return isTop;
    }

    public void setIsTop(String isTop) {
        this.isTop = isTop;
    }

    public String getIsRecomm() {
        return isRecomm;
    }

    public void setIsRecomm(String isRecomm) {
        this.isRecomm = isRecomm;
    }

    public List<AddGoodsSkuGroupVo> getSkuGroup() {
        return skuGroup;
    }

    public void setSkuGroup(List<AddGoodsSkuGroupVo> skuGroup) {
        this.skuGroup = skuGroup;
    }

    public List<OssDatumVo> getDetailsOss() {
        return detailsOss;
    }

    public void setDetailsOss(List<OssDatumVo> detailsOss) {
        this.detailsOss = detailsOss;
    }
}
